package main

import (
	"fmt"
	"time"
)

type myInt int

type Book struct {
	title  string
	author string
}

func newTask() {
	i := 0
	for {
		i++
		fmt.Printf("new Goroutine ：i = %d\n", i)
		time.Sleep(1 * time.Second)
	}
}

func main() {
	fmt.Println("test")
	// 创建一个goroutine
	go newTask()
	i := 0
	for {
		i++
		fmt.Printf("main goroutine: i = %d\n", i)
		time.Sleep(1 * time.Second)
	}
}
